package com.example.web;

import com.example.Service.StudentService;
import com.example.model.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class StudentWeb {
    @Autowired
    private StudentService studentService;

    @ResponseBody
    @RequestMapping("/student")
    public Student selectStudent(Student student){
        Student student1 = studentService.selectStudent(student.getId());
        return student1;
    }
}
